//
//  MineCell.m
//  IntimateGift
//
//  Created by zh on 14/12/17.
//  Copyright (c) 2014年 蔡宏业. All rights reserved.
//

#import "MineCell.h"
#import "UIColor+AddColor.h"
@implementation MineCell

- (void)dealloc
{
    [_myLabel release];
    [_myImageView release];
    [super dealloc];
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.myImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.myImageView];
        [_myImageView release];
        
        self.myLabel = [[UILabel alloc] init];
        [ self.contentView addSubview:self.myLabel];
        self.myLabel.numberOfLines = 0;
        self.myLabel.textColor = [UIColor whiteColor];
        self.myLabel.textAlignment =  NSTextAlignmentCenter;
        self.myLabel.backgroundColor = [UIColor titleColor];
        [_myLabel release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.myLabel.frame = CGRectMake(10, self.contentView.bounds.size.height * 5 / 6 - 10, self.contentView.bounds.size.width - 20, self.contentView.bounds.size.height * 1 / 6 );
    self.myImageView.frame = CGRectMake(10, 10, self.contentView.bounds.size.width - 20 , self.contentView.bounds.size.height * 5 / 6 - 10 );
    
}
@end
